package com.iemp.service.impl.list;

import com.iemp.bean.example.IntroExample;
import com.iemp.bean.impl.Intro;
import com.iemp.dao.IntroMapper;
import com.iemp.service.base.AbstractListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
@Slf4j
public class IntroServiceImpl extends AbstractListService<Intro> {
    public final IntroMapper mapper;

    public IntroServiceImpl(IntroMapper introMapper) {
        this.mapper = introMapper;
    }

    @Override
    public List findAllByList() {
        return mapper.selectByExample(new IntroExample());
    }

    @Override
    public Integer deleteById(Integer id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public Intro selectById(Integer id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Intro entity) {
        return mapper.insertSelective(entity);
    }

    @Override
    public int updateByIdSelective(Intro entity) {
        return mapper.updateByPrimaryKeySelective(entity);
    }
}
